message("IN ANYKA391X PROJECT")
set(link_libs ghttp opus wlosal protocol)
add_definitions(-DWL_OS_ANYKA_LINUX)
include_directories(${CMAKE_SOURCE_DIR}/anyka_sdk/inc)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/opus)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/protocol)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/wlosal)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/libraries/ghttp)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/src/wlsdk)

add_custom_target(combined
        COMMAND ${CMAKE_AR} -x $<TARGET_FILE:opus>
        COMMAND ${CMAKE_AR} -x $<TARGET_FILE:protocol>
        COMMAND ${CMAKE_AR} -x $<TARGET_FILE:wlosal>
        COMMAND ${CMAKE_AR} -x $<TARGET_FILE:ghttp>
        COMMAND ${CMAKE_AR} -x $<TARGET_FILE:wlsdk>
        WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/obj
        COMMAND ${CMAKE_AR} -qcs ${weila_sdk_lib} ${CMAKE_BINARY_DIR}/obj/*.o*
        DEPENDS opus protocol)


message("END ANYKA391X PROJECT")